//
//  UILabel+Extension.swift
//  sinaweibo
//
//  Created by mac book pro on 16/3/26.
//  Copyright © 2016年 finish. All rights reserved.
//

import UIKit
extension UILabel{
    convenience init(title: String,textcolor:UIColor,font:CGFloat){
        self.init()
        self.text = title
        self.textColor = textcolor
        self.font = UIFont.systemFontOfSize(font)
        self.sizeToFit()
    }
    convenience init(textcolor:UIColor,font:CGFloat){
        self.init()
        self.textColor = textcolor
        self.font = UIFont.systemFontOfSize(font)
    }
    convenience init(color: UIColor, fontSize: CGFloat, numberOfLines: Int = 1) {
        self.init()
        
        // 设置字体颜色
        textColor = color
        
        // 设置大小
        font = UIFont.systemFontOfSize(fontSize)
        
        // 显示行数
        self.numberOfLines = numberOfLines
    }
}
